package Demo01.Flower;

public  class Rose extends  Flower {
    public String where;
    public Rose(String color,int price) {
        super(color,price);
    }
    public void warn() {
        System.out.println("不要摘玫瑰花，小心扎手！");

    }

    @Override
    public void showInfo() {

        System.out.println(where);
    }

    public Rose() {
    }

    public Rose(String where) {
        this.where = where;
    }

    /**
     * 获取
     * @return where
     */
    public String getWhere() {
        return where;
    }

    /**
     * 设置
     * @param where
     */
    public void setWhere(String where) {
        this.where = where;
    }

    public String toString() {
        return "Rose{where = " + where + "}";
    }
}
